package com.code.softeem.lianxi.demo1;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/20 14:44
 * @description
 */
/*
已知学生类和老师类如下：
			属性:姓名,年龄
			行为:吃饭
			老师有特有的方法:讲课
			学生有特有的方法:学习
 */
public class people {
    private String name;
    private int age;

    public people() {
    }

    public people(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void eat(){
        System.out.println(name+"在吃饭");
    }
    @Override
    public String toString() {
        return "people{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
